package fhp.hlhj.giantfold.adapter

import android.animation.AnimatorInflater
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import fhp.hlhj.giantfold.R
import java.util.ArrayList

/**
 * author: FHP
 * data: on 2018\1\30 0030 11:06
 * E-Mail: 103945089@qq.com
 */
class FlipAdp(layoutId:Int,datas:ArrayList<String>) :BaseQuickAdapter<String,BaseViewHolder>(layoutId,datas) {
    override fun convert(helper: BaseViewHolder, item: String?) {
        when(helper.layoutPosition){
            0->{
                helper.setImageResource(R.id.imgFront,R.mipmap.card_front_blue)
            }
            1->{
                helper.setImageResource(R.id.imgFront,R.mipmap.card_front_green)

            }
            2->{
                helper.setImageResource(R.id.imgFront,R.mipmap.card_front_purple)

            }
            3->{
                helper.setImageResource(R.id.imgFront,R.mipmap.card_front_blue)

            }
            4->{
                helper.setImageResource(R.id.imgFront,R.mipmap.card_front_yellow)

            }
            5->{
                helper.setImageResource(R.id.imgFront,R.mipmap.card_front_purple)

            }
        }


        

    }
/*    private fun setCameraDistance() {
        val distance = 16000;
        val scale = mContext.getResources().getDisplayMetrics().density * distance;
        mFlCardFront.setCameraDistance(scale);
        mFlCardBack.setCameraDistance(scale);
    }*/
}